name: check
on: [push, pull_request]

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - name: Install required libraries
        run: >
          sudo apt-get update && sudo apt-get install -y 
          python3 python3-pip python3-setuptools python3-wheel
          cmake make build-essential clang-tidy
          libpam0g-dev libinih-dev libevdev-dev 
          python3-dev libopencv-dev
        
      - name: Install meson
        run: sudo python3 -m pip install meson ninja

      - uses: actions/checkout@v2

      - name: Build
        run: |
          meson setup build
          ninja -C build

      - name: Check source code
        run: |
          ninja clang-tidy -C build
